package com.example.demo.pattern.factory.abstraces;

import com.example.demo.pattern.factory.Color;
import com.example.demo.pattern.factory.general.Shape;


public class ColorFactory extends AbstractFactory {
    @Override
    public Shape getShape(String shapeType) {
        return null;
    }

    @Override
    public Color getColor(String colorType) {
        if (colorType == null) return null;
        if (colorType.equalsIgnoreCase("red")){
            return new Red();
        }else if (colorType.equalsIgnoreCase("bule")){
            return new Bule();
        }else {
            return null;
        }
    }
}
